package DynamicProgramming;

import java.io.PrintWriter;
import java.util.Scanner;

class Solver1081
{	private int n,k;
	private int[] A,B,T,Rs;
	private boolean rsExist=true;
	
	public void Input()
	{	Scanner in=new Scanner(System.in);
		n=in.nextInt();
		k=in.nextInt();
		
		A=new int[n+1];
		B=new int[n+1];
		T=new int[n+1];
		Rs=new int[n+1];
	}
	public void Solve()
	{	int i,j;
		A[1]=1;B[1]=1;T[1]=A[1]+B[1];
		
		for (i=2;i<=n;i++)
		{	A[i]=T[i-1];
			B[i]=A[i-1];
			T[i]=A[i]+B[i];
		}
		if (k>T[n]) rsExist=false;
		for (j=n;j>=1;j--)
		{	if (T[j]>=k)
			{	if (A[j]>=k)
				{	Rs[n+1-j]=0;
				}
				else
				{	k-=A[j];
					Rs[n+1-j]=1;
				}
			}
		}
	}
	public void Output()
	{	PrintWriter out=new PrintWriter(System.out);
		if (rsExist)
		{	for (int i=1;i<=n;i++)
				out.print(Rs[i]);
			out.println();
		}
		else
			out.println(-1);
		out.flush();
	}
	public void main()
	{	Input();
		Solve();
		Output();
	}
}			
public class P1081
{	public static void main(String[] args)
	{	Solver1081 solver=new Solver1081();
		solver.main();
	}
}
